package com.zhishu.controller;

import com.zhishu.entity.Person;
import com.zhishu.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/person")
public class PersonController {
    @Autowired
    PersonService personService;
    @GetMapping("/selectPersonByid/{pid}")
    public Person selectPersonByid(@PathVariable("pid") String pid){

        return personService.selectPersonByid(pid);
    }

}
